home *** CD-ROM | disk | FTP | other *** search
- Subject: Extension Link Problem
- Sent: 6/7/96 7:19 AM
- Received: 6/7/96 8:51 AM
- From: Doyle Rhynard, doyle.w.rhynard@cpmx.saic.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- I am having a problem with linking a client part when I reference an
- extension defined in another part. This the IDL file that I am using to
- define the extension, TestExt:
-
- #ifndef TestExt_IDL
- #define TestExt_IDL
-
- #include "Extensn.idl"
-
- interface TestExt;
-
- module ADI {
- interface TestExt: ODExtension {
- void InitTestExt(in ODObject base, in long initialID);
- long GetX();
- void SetX(in long Y);
- void Run();
-
- #ifdef __SOMIDL__
- implementation {
- majorversion = 1; minorversion = 0;
- long x;
-
- releaseorder:
- InitTestExt,
- GetX,
- SetX,
- Run;
- };
- #endif
- };
- };
-
- #endif
-
-
- I have added the method, RunTest, to the client ODFContainer derived part:
-
- void CADISimPart::RunTest(Environment *ev) {
- int NumProxies = fPartContent->CountProxies();
- CContentProxyIterator ite(fPartContent);
-
- for (CProxy* proxy = ite.First(); ite.IsNotComplete(); proxy = ite.Next()) {
- ODPart* partTest = proxy->AcquireEmbeddedPart(ev);
- FW_Boolean extODExists = partTest->HasExtension(ev, "TestExt");
- if (extODExists) {
- ODExtension* extPartOD = partTest->AcquireExtension(ev, "TestExt");
- ((ADI_TestExt*)extPartOD)->Run(ev);
- }
- }
- }
-
-
- Everything compiles without any problems. However, when I try to link the
- client part, I keep gettin the link error:
-
- Link Error : undefined 'ADI_TestExtClassData' (data)
- Referenced from 'CADISimPart::RunTest(Environment*)' in Part.cpp
-
-
- Can anyone venture a guess as what I am doing wrong. I have working on
- getting a simple extension to work for more than a week, now. Without any
- complete working examples to guide me, I feel that I am just fumbling
- around in the dark trying to piece together what I need to do from the
- little concrete information that is available.
-
- Doyle Rhynard
-
-